#include <iostream>
#include <<iomanip>
#include <string>
using namespace std;

struct Student {
    string name;
    double chinese, math, english;
    double average;
};

void outputStudent(const Student& stu) {
    cout << fixed << setprecision(2);
    cout << stu.name << " " << stu.chinese << " " << stu.math << " " << stu.english << " " << stu.average;
    if (stu.average >= 90) {
        cout << " Excellent";
    }
    cout << endl;
}

int main() {
    int n;
    cin >> n;
    Student students[n];
    for (int i = 0; i < n; i++) {
        cin >> students[i].name >> students[i].chinese >> students[i].math >> students[i].english;
        students[i].average = (students[i].chinese + students[i].math + students[i].english) / 3;
    }
    for (int i = 0; i < n; i++) {
        outputStudent(students[i]);
    }
    return 0;
}
#include <iostream>
#include <cstring>
using namespace std;

int countVowels(const char* p) {
    int count = 0;
    while (*p != '\0') {
        char c = tolower(*p);
        if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
            count++;
        }
        p++;
    }
    return count;
}

int main() {
    char str[100];
    cin.getline(str, 100);
    int num = countVowels(str);
    cout << "Number of vowels: " << num << endl;
    return 0;
}
#include <iostream>
#include <<iomanip>
using namespace std;

inline double square(double x) {
    return x * x;
}

double power(double base, int exponent = 2) {
    double result = 1;
    for (int i = 0; i < exponent; i++) {
        result *= base;
    }
    return result;
}

double calc(double a, double b, char op) {
    switch (op) {
        case '+': return a + b;
        case '-': return a - b;
        case '*': return a * b;
        case '/': 
            if (b == 0) {
                cout << "Error: divide by zero" << endl;
                return 0;
            }
            return a / b;
        default: return 0;
    }
}

double calc(int a, int b, char op) {
    return calc(static_cast<double>(a), static_cast<double>(b), op);
}

int main() {
    double a, b;
    char op;
    cin >> a >> b >> op;
    
    cout << fixed << setprecision(2);
    cout << "square(" << a << ") = " << square(a) << endl;
    cout << "power(" << a << "," << b << ") = " << power(a, static_cast<int>(b)) << endl;
    calc(a, b, op);
    
    return 0;
}
#include <iostream>
using namespace std;

void swap(int& x, int& y) {
    int temp = x;
    x = y;
    y = temp;
}
void swap(int* x, int* y) {
    int temp = *x;
    *x = *y;
    *y = temp;
}

int main() {
    int x, y;
    cin >> x >> y;
    cout << "Before swap: x=" << x << ", y=" << y << endl;
    swap(x, y);
    cout << "After swap: x=" << x << ", y=" << y << endl;
    return 0;
}
